
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpGfsFile.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpGfsFileForm"
 */
public class CcpGfsFileForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cgfGuid = null;
   private java.lang.String _cgfName = null;
   private java.lang.String _suffix = null;
   private java.lang.String _inputDate = null;
   private java.lang.String _cgcGuid = null;
   private java.lang.String _businessCode = null;
   private java.lang.String _fileSize = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpGfsFileForm() {
   }

   /**
    * Returns the cgfGuid
    *
    * @return the cgfGuid
    */
   public java.lang.String getCgfGuid() {
      return _cgfGuid;
   }

   /**
    * Sets the cgfGuid
    *
    * @param cgfGuid the new cgfGuid value
    */
   public void setCgfGuid(java.lang.String cgfGuid) {
      _cgfGuid = cgfGuid;
   }
   /**
    * Returns the cgfName
    *
    * @return the cgfName
    */
   public java.lang.String getCgfName() {
      return _cgfName;
   }

   /**
    * Sets the cgfName
    *
    * @param cgfName the new cgfName value
    */
   public void setCgfName(java.lang.String cgfName) {
      _cgfName = cgfName;
   }
   /**
    * Returns the suffix
    *
    * @return the suffix
    */
   public java.lang.String getSuffix() {
      return _suffix;
   }

   /**
    * Sets the suffix
    *
    * @param suffix the new suffix value
    */
   public void setSuffix(java.lang.String suffix) {
      _suffix = suffix;
   }
   /**
    * Returns the inputDate
    *
    * @return the inputDate
    */
   public java.lang.String getInputDate() {
      return _inputDate;
   }

   /**
    * Sets the inputDate
    *
    * @param inputDate the new inputDate value
    */
   public void setInputDate(java.lang.String inputDate) {
      _inputDate = inputDate;
   }
   /**
    * Returns the cgcGuid
    *
    * @return the cgcGuid
    */
   public java.lang.String getCgcGuid() {
      return _cgcGuid;
   }

   /**
    * Sets the cgcGuid
    *
    * @param cgcGuid the new cgcGuid value
    */
   public void setCgcGuid(java.lang.String cgcGuid) {
      _cgcGuid = cgcGuid;
   }
   /**
    * Returns the businessCode
    *
    * @return the businessCode
    */
   public java.lang.String getBusinessCode() {
      return _businessCode;
   }

   /**
    * Sets the businessCode
    *
    * @param businessCode the new businessCode value
    */
   public void setBusinessCode(java.lang.String businessCode) {
      _businessCode = businessCode;
   }
   /**
    * Returns the fileSize
    *
    * @return the fileSize
    */
   public java.lang.String getFileSize() {
      return _fileSize;
   }

   /**
    * Sets the fileSize
    *
    * @param fileSize the new fileSize value
    */
   public void setFileSize(java.lang.String fileSize) {
      _fileSize = fileSize;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCgfGuid() == null) {
         errors.add("cgfGuid", new ActionError("error.cgfGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
